/* 
 * File:   main.cpp
 * Author: michele
 *
 * Created on February 15, 2012, 1:43 PM
 */




#include "Compiler.h"
#include "Scanner.h"

using namespace std;

/*
 * 
 */
int main(int argc, char** argv) {
    if(argc!=2){
                cerr << "Compiler input: \"filename.pas\" "<<endl;
                exit(-1);
    }
    else{
        if(!strstr(argv[1],".pas")){
            cerr << "Compiler input: \"filename.pas\" "<<endl;
            exit(-1);
        }
    }
    //Scanner scanner("es.pas");
    //scanner.scan();
    Compiler compiler(argv[1]);
    return compiler.programP() ? 0 : -1;
}

